/*
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2023-03-15 15:10:06
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2023-03-15 15:31:53
 */
'use static'

const fs = require('fs')
const files = fs.readdirSync(__dirname).filter(file => file !== 'index.js')


const services = {}
for (const file of files) {
    if (file.toLowerCase().endsWith('js')) {
        const service = require(`./${file}`)
        services[`${file.replace(/\.js/, '')}`] = service
    }
}

module.exports = services